<?	class UCActivation extends UseCase 	{		function defaultAction($p)		{			global $db;			$p->add("<document>");			$p->add($this->eachPage());						if(isset($_GET['id']) && strlen($_GET['id']) > 0 && ereg("([0-9a-f]*)", $_GET['id'], $rg)) {				$id = $rg[1];				$res = $db->query("SELECT * FROM r_user WHERE activation_code='$id'");				if(count($res) == 1) {					$db->query("UPDATE r_user SET enable='1' WHERE id_r_user='".$res[0]['id_r_user']."'");					$s = $this->getDocument('activation_successful');				} else {					$s = $this->getDocument('activation_unsuccessful');				} 			} else {				$s = $this->getDocument('activation_unsuccessful');			}			$p->add($s);			$p->add("</document>");			return $p;		}	}?>